package com.rfsp.common.mapper;

import java.util.List;

import com.rfsp.common.pojo.po.OrgPO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.rfsp.common.base.BaseMapper;
import org.springframework.stereotype.Repository;

@Repository
public interface OrgMapper extends BaseMapper<OrgPO> {
	
	@Select("SELECT o.id, o.`org_name` FROM m_user_org o WHERE a.id=#{orgId}")
	List<OrgPO> queryBrandByCid(@Param("orgId") String orgId);
	
	
	
	@Select("SELECT o.* FROM m_user_org o inner join m_user u on o.id= u.org_id WHERE u.USER_STATUS = '1' and u.id=#{userId}")
	OrgPO getOrgByUserId(@Param("userId") Long userId);

}